{
  "properties" : { },
  "id" : "de00850bf5b24b0eaefade47f0b32abd",
  "script" : null,
  "groupId" : "5cec3d7ac81d478c81f6046ed83ab5da",
  "name" : "查询告警指标列表",
  "createTime" : 1727070909684,
  "updateTime" : 1724893251643,
  "lock" : "1",
  "createBy" : "ndmp",
  "updateBy" : "ndmp",
  "path" : "list",
  "method" : "GET",
  "parameters" : [ {
    "name" : "metircName",
    "value" : "率",
    "description" : null,
    "required" : false,
    "dataType" : "String",
    "type" : null,
    "defaultValue" : null,
    "validateType" : null,
    "error" : null,
    "expression" : null,
    "children" : null
  } ],
  "options" : [ ],
  "requestBody" : "",
  "headers" : [ ],
  "paths" : [ ],
  "responseBody" : "{\n    \"status\": 200,\n    \"message\": \"success\",\n    \"data\": {\n        \"total\": 10,\n        \"current\": 1,\n        \"size\": 30,\n        \"records\": [\n            {\n                \"id\": 17,\n                \"code\": \"cpuUsage\",\n                \"metircName\": \"CPU使用率\",\n                \"metircCategory\": 0,\n                \"metircDescr\": \"CPU使用率是否越限\",\n                \"metircTypeId\": \"10\",\n                \"unit\": \"%\",\n                \"rowId\": 1\n            },\n            {\n                \"id\": 18,\n                \"code\": \"packetLoss\",\n                \"metircName\": \"丢包率\",\n                \"metircCategory\": 0,\n                \"metircDescr\": \"丢包率是否越限 \",\n                \"metircTypeId\": \"10\",\n                \"unit\": \"%\",\n                \"rowId\": 2\n            },\n            {\n                \"id\": 19,\n                \"code\": \"memUsage\",\n                \"metircName\": \"内存利用率\",\n                \"metircCategory\": 0,\n                \"metircDescr\": \"内存利用率是否越限\",\n                \"metircTypeId\": \"10\",\n                \"unit\": \"%\",\n                \"rowId\": 3\n            },\n            {\n                \"id\": 20,\n                \"code\": \"ifFlowSpeed\",\n                \"metircName\": \"接口带宽\",\n                \"metircCategory\": 0,\n                \"metircDescr\": \"接口带宽是否越限\",\n                \"metircTypeId\": \"10\",\n                \"unit\": \"KB\",\n                \"rowId\": 4\n            },\n            {\n                \"id\": 21,\n                \"code\": \"delayTime\",\n                \"metircName\": \"时延\",\n                \"metircCategory\": 0,\n                \"metircDescr\": \"时延是否越限 \",\n                \"metircTypeId\": \"10\",\n                \"unit\": \"ms\",\n                \"rowId\": 5\n            },\n            {\n                \"id\": 22,\n                \"code\": \"temperature\",\n                \"metircName\": \"温度\",\n                \"metircCategory\": 0,\n                \"metircDescr\": \"温度是否越限\",\n                \"metircTypeId\": \"10\",\n                \"unit\": \"°C\",\n                \"rowId\": 6\n            },\n            {\n                \"id\": 23,\n                \"code\": \"reachable\",\n                \"metircName\": \"网络可达\",\n                \"metircCategory\": 1,\n                \"metircDescr\": \"网络是否可达\",\n                \"metircTypeId\": \"12\",\n                \"unit\": \"\",\n                \"rowId\": 7\n            },\n            {\n                \"id\": 24,\n                \"code\": \"flowSpeed\",\n                \"metircName\": \"设备带宽\",\n                \"metircCategory\": 0,\n                \"metircDescr\": \"设备带宽是否越限\",\n                \"metircTypeId\": \"10\",\n                \"unit\": \"KB\",\n                \"rowId\": 8\n            },\n            {\n                \"id\": 25,\n                \"code\": \"linkUpDown\",\n                \"metircName\": \"网口断开\",\n                \"metircCategory\": 1,\n                \"metircDescr\": \"设备接口是否故障\",\n                \"metircTypeId\": \"12\",\n                \"unit\": \"\",\n                \"rowId\": 9\n            },\n            {\n                \"id\": 32,\n                \"code\": \"login\",\n                \"metircName\": \"ssh登录\",\n                \"metircCategory\": 1,\n                \"metircDescr\": \"登录是否成功\",\n                \"metircTypeId\": \"13\",\n                \"unit\": \"\",\n                \"rowId\": 10\n            }\n        ]\n    }\n}",
  "description" : null,
  "requestBodyDefinition" : null,
  "responseBodyDefinition" : null
}
================================
var sql = """
    SELECT * FROM alarm_metric
    <where>
        <if test="metircName != null and metircName != ''">
            and METIRC_NAME like concat('%',#{metircName} ,'%')
        </if>
    </where>
"""

return db.page(sql) 